package com.example.androidtest;





import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;


public class MainActivity extends Activity {
Button btn1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        initview();
    }
    
    private void initview(){
    	btn1=(Button)findViewById(R.id.btn1);
    	btn1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
			Intent i=new Intent(MainActivity.this,Main2Activity.class);
						startActivity(i);
//						
//						Intent intent = new Intent("testApp");
//						startActivity(intent);
				
				
			}
		});
    }
    
    
    private void startRun(){
    	new Thread(new Runnable() {
			
			@Override
			public void run() {
				Message msg=new Message();
			
				
			}
		}).start();
    }
    
    private Handler handler=new Handler(){
		@Override
		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
			super.handleMessage(msg);
		}
		@Override
		public void dispatchMessage(Message msg) {
			// TODO Auto-generated method stub
			super.dispatchMessage(msg);
		}
		@SuppressLint("NewApi")
		@Override
		public String getMessageName(Message message) {
			// TODO Auto-generated method stub
			return super.getMessageName(message);
		}
		@Override
		public boolean sendMessageAtTime(Message msg, long uptimeMillis) {
			// TODO Auto-generated method stub
			return super.sendMessageAtTime(msg, uptimeMillis);
		}
    };
    
    
}
